<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="sorter/style.css" />
<title>ViewALl</title>
</head>
<body>

  
<a href="index.php?action=editar">agegar nuevo</a>
<form id="form1" name="form1" method="post" action="">
  <table width="200" border="0" id="tabla" class="sortable">
   <thead>
    <tr>
      <th scope="col" >Id</th>
      <th scope="col">Nombre</th>
      <th scope="col"> Borrar</th>
      <th scope="col"> Editar</th>
    </tr>
   </thead>
   <tbody>    
    <?php 
	if(isset($persona)){
	foreach($persona as $key => $v){
	?>
    <tr>
      <td><?=$v->id?>
      </td>
      <td><?=$v->nombre?></td>
<td title="id=<?=$v->id?>"><a href="index.php?action=eliminar&id=<?=$v->id?>">Borrar </a></td>
<td title="id=<?=$v->id?>"><a href="index.php?action=editar&id=<?=$v->id?>">Editar </a></td>
    </tr>
    <?php }}?>
    </tbody>
  </table>
</form>
<div id="controls">
		<div id="perpage">
			<select onchange="sorter.size(this.value)">
			<option value="5" selected="selected">5</option>
				<option value="10" >10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select>
			<span>Elementos por p&aacute;gina</span>
		</div>
		<div id="navigation">
			<img src="sorter/images/first.gif" width="16" height="16" alt="First Page" onclick="sorter.move(-1,true)" />
			<img src="sorter/images/previous.gif" width="16" height="16" alt="First Page" onclick="sorter.move(-1)" />
			<img src="sorter/images/next.gif" width="16" height="16" alt="First Page" onclick="sorter.move(1)" />
			<img src="sorter/images/last.gif" width="16" height="16" alt="Last Page" onclick="sorter.move(1,true)" />
		</div>
		<div id="text">Mostrando pagina <span id="currentpage"></span> de <span id="pagelimit"></span></div>
	</div>
<script type="text/javascript" src="sorter/script.js"></script>
	<script type="text/javascript">
  var sorter = new TINY.table.sorter("sorter");
	sorter.head = "head";
	sorter.asc = "asc";
	sorter.desc = "desc";
	sorter.even = "evenrow";
	sorter.odd = "oddrow";
	sorter.evensel = "evenselected";
	sorter.oddsel = "oddselected";
	sorter.paginate = true;
	sorter.currentid = "currentpage";
	sorter.limitid = "pagelimit";
	sorter.init("tabla",1);
  </script>
</body>
</html>